<?php

namespace app\controller\admin;

use core\controller\AdminBase;
use ReflectionClass;
use support\View;

class Widget extends AdminBase
{

    public function index()
    {
        return $this->view(frame: false);
    }

    /**
     * 配置挂件
     *
     * @return void
     */
    public function configuration()
    {

        if (is_post()) {
        } else {

            $sethtml = '';
            $reflectionClass = new ReflectionClass(
                'component\\widget\\'
                    . 'admin\\shortcutmenu'
                    . '\\controller\\Index'
            );

            $method = $reflectionClass->getMethod('set');
            if ($method->isPublic()) {
                $instance = $reflectionClass->newInstance();
                $sethtml =  $method->invoke($instance);
            }
            View::assign('sethtml', $sethtml);
            return $this->view(frame: false);
        }
    }
}
